const Mock = require('mockjs')

function randomCityWithDistrict() {
	const cities = ['北京', '上海', '广州', '深圳', '杭州', '南京']; // 可以根据需要添加更多城市
	const randomCity = cities[Math.floor(Math.random() * cities.length)];
	const district = ['区', '县']; // 区和县随机选择一个
	const randomDistrict = district[Math.floor(Math.random() * district.length)];
	
	return `${randomCity}市${randomDistrict}`;
}

const data = Mock.mock({
	
		companyID: '@integer(0,9)',
		companyChineseName: '@cname',
		'companyEnglishName|3': '@integer(0,9)',
		'companyInstCode|7': '@integer(0,9)',
		'companyPostcode|6': '@integer(0,9)',
		companyLocation: randomCityWithDistrict(),//"抚州市临川区",
		companyIndustry:"",//"住宿和餐饮业/酒店",
		companyNature:"国有企业/中央国有企业",
		companyBusiness:"自助餐",
		companyContacts:'@cname',
		'companyPhone|11': '@integer(0,9)',
		companyAddress: '@cname',
		companyFax:"0754-7777777",
		companyEmail: '123@qq.com',
		'companyRecordStatus|1': [0, 1, 2, 3, 4]//[true, false],
})

module.exports = [
	{
		url: '/enterprise/enterpriseRecord/submitEnterpriseInfo',
		type: 'post',
		response: config => {

			console.log(config.query.is_Submit)
			
			const items = data.items
			return {
				code: 200,
				
			}
		}
	}
]
